package reduce.fz.com.reduce.custom;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import reduce.fz.com.reduce.R;
import reduce.fz.com.reduce.util.PicassoUtil;

/**
 * 发现卡片定制
 * Created by qingshengzheng on 15/7/25.
 */
public class FindTopicCard extends RelativeLayout {

    private ImageView image;
    private TextView topic;
    private TextView desc;
    private LayoutInflater layoutInflater;

    public FindTopicCard(Context context) {
        super(context);
    }

    public FindTopicCard(Context context, AttributeSet attrs) {
        super(context, attrs);
        layoutInflater = LayoutInflater.from(context);
        View view = layoutInflater.inflate(R.layout.custom_find_view_card, null);
       // this.image = (ImageView) view.findViewById(R.id.find_topic_iamge);
        //this.topic = (TextView) view.findViewById(R.id.find_topic);
        //this.desc = (TextView) view.findViewById(R.id.find_topic_desc);
    }

    public void setContent(String url, String topic, String desc) {
        PicassoUtil.laodUrl(this.getContext(), url, image);
        this.topic.setText(topic);
        this.desc.setText(desc);
    }
}
